function drawText(text, x, y) {
    var canvas = document.getElementById("battlefieldCanvas");
    if (canvas.getContext) {
        var context = canvas.getContext("2d");

        context.lineWidth = 1;
        context.fillStyle = "#CC00FF";
        context.lineStyle = "#ffff00";
        context.font = "18px sans-serif";
        context.fillText(text, x, y);
    }
}